package com.hk.commons.entity.sys;


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

/**
 * 系统角色
 * 
 * @author saga
 * 
 */
@Entity
@Table(name = "SysRole")
public class SysRole implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8611632280594300793L;

	/** 角色编号 */
	@Id
	@Column(name = "Id", length = 20)
	private Long id;

	/** 角色名称 */
	@Column(name = "Name", length = 10)
	private String name;

	/** 角色编码 */
	@Column(name = "Code", length = 10)
	private String code;

	/** 角色描述 */
	@Column(name = "Description", length = 20)
	private String desc;

	/** 创建时间 */
	@Column(name = "CreatedTS")
	private Long createdts = System.currentTimeMillis();

	/** 更新时间 */
	@Column(name = "UpdatedTS")
	private Long updatedts;

	//角色类型  1：普通角色， 2：与组织架构相关的角色
	private Integer roleType = 1;

	/** 创建者 */
	@Column(name = "Creator", length = 30)
	private String creator;

	public Integer getRoleType() {
		return roleType;
	}

	public void setRoleType(Integer roleType) {
		this.roleType = roleType;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public Long getCreatedts() {
		return createdts;
	}

	public void setCreatedts(Long createdts) {
		this.createdts = createdts;
	}

	public Long getUpdatedts() {
		return updatedts;
	}

	public void setUpdatedts(Long updatets) {
		this.updatedts = updatets;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}
}
